/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rbh.visanyee.support;

import com.rbh.visanyee.entity.Profile;
import java.io.Serializable;
import java.util.Collection;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

/**
 *
 * @author M
 */
public class ProfileUserDetails extends User implements Serializable{
    private Profile profile;

    public ProfileUserDetails(String username, String password, Profile profile, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.profile = profile;
    }

    public ProfileUserDetails(String username, String password, Profile profile, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
        this.profile = profile;
    }

    public Profile getProfile() {
        return profile;
    }

    public void setProfile(Profile profile) {
        this.profile = profile;
    }
}
